const request = require('./api.js')

//调用方法  调用时传入数据
export const postToken = (params) => {
	return request.default.post('/top/playlist', params)
}

// 验证码登录
export const setSignInCode = (params) => {
	return request.default.post('/user/login', params)
}

// 微信登录
export const setSignInWechatLogin = (params) => {
	return request.default.post('/user/wechatLogin', params)
}

// 微信登录app
export const setSignInWechatLoginApp = (params) => {
	return request.default.post('/user/wechatAppLogin', params)
}

export const setSignInWechatLoginApp2 = (params) => {
	return request.default.post('/user/wechatBind', params)
}

// 一键登录
export const setOneKeyLogin = (params) =>{
	return request.default.post('/user/phoneLogin',params)
}

// 加入精算单
export const setShopCartAdd = (params) => {
	return request.default.post('/shop/addShopCart', params)
}

// 加入报价系统
export const setOfferAdd = (params) => {
	return request.default.post('/my/addOffer', params)
}

// 修改个人信息
export const setUserInfo = (params) =>{ 
	return request.default.post('/my/update',params)
}

//  点赞收藏
 //1讲述 2找灵感 3平台介绍 4装修流程 5轮播详情 6设计案例 7工地现场 8店铺 9普通商品 10 工长商品 
 // 11 工艺标准 12 三方监理 13 新房验收  14 装修攻略
export const setLikeCollection = (params) => {
	return request.default.post(params.flag ? '/my/delLikeCollect' : '/my/likeCollect', {
		type: params.type,
		other_id: params.id,
		is_like: params.status // 1 喜欢 2 收藏
	})
}

// 增加浏览量
export const setAddLook = (params) =>{
	return request.default.post('/home/addLook',params)
}

// 转发
export const setAddShare = (params) => {
	return request.default.post('/home/addTransmit',params)
}


